#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
int main()
{
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (c >= a && d >= b || c >= b && d >= a)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
    return 0;
}